home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / othergnu / gnuplot.zoo / demo / surface1.demo < prev    next >
Text File  |  1992-03-02  |  3KB  |  122 lines

  1. set samples 21
  2. set isosample 11
  3. set xlabel "X axis" -3,-2
  4. set ylabel "Y axis" 3,-2
  5. set zlabel "Z axis" -5
  6. set title "3D gnu plot demo"
  7. set label 1 "This is the surface boundary" at -20,-5,210
  8. set arrow 1 from -10,-5,220 to -10,0,0 nohead
  9. set arrow 2 from -10,-5,220 to 10,0,0 nohead
  10. set arrow 3 from -10,-5,220 to 0,10,0 nohead
  11. set arrow 4 from -10,-5,220 to 0,-10,0 nohead
  12. splot x*y
  13. pause -1 "Hit return to continue (1)"
  14. set noarrow
  15. set nolabel
  16. set grid
  17. splot x**2+y**2, x**2-y**2
  18. pause -1 "Hit return to continue (2)"
  19. rep x*y
  20. pause -1 "Hit return to continue (3)"
  21. rep (x**3+y**3)/10
  22. pause -1 "Hit return to continue (4)"
  23. set ticslevel 0.0
  24. set title "3D gnu plot demo ( ticslevel = 0.0 )"
  25. rep
  26. pause -1 "Hit return to continue (5)"
  27. set ticslevel 2.0
  28. set title "3D gnu plot demo ( ticslevel = 2.0 )"
  29. rep
  30. pause -1 "Hit return to continue (6)"
  31. set ticslevel 0.5
  32. set title "3D gnu plot demo ( ticslevel = 0.5 )"
  33. rep
  34. pause -1 "Hit return to continue (7)"
  35. set title "3D gnu plot demo"
  36. set nogrid
  37. splot x*y with points
  38. pause -1 "Hit return to continue (8)"
  39. set noxtics
  40. set noytics
  41. set xrange [-1:1]
  42. set yrange [-1:1]
  43. set title "Surfaces with no grid or tics"
  44. splot x*y with lines, x**2*y**3 with dots, x**3*y*2 with points
  45. pause -1 "Hit return to continue (9)"
  46. set xtics ("low" -3, "mid" 0, "high" 3)
  47. set ytics -2,0.5,2
  48. set xrange [-3:3]
  49. set yrange [-3:3]
  50. set log z
  51. set title "Surfaces with z log scale"
  52. splot x**2*y**2 + 2, x**2*y**4 + 2, x**4*y**2 + 2
  53. pause -1 "Hit return to continue (10)"
  54. set nolog z
  55. set xtics
  56. set ytics
  57. set xrange [-1:1]
  58. set yrange [-1:1]
  59. set samples 51
  60. set isosample 21
  61. set dummy u,v
  62. set title "3D gnu plot demo"
  63. splot u*v / (u**2 + v**2 + 0.1)
  64. pause -1 "Hit return to continue (11)"
  65. splot [x=-3:3] [y=-3:3] sin(x) * cos(y)
  66. pause -1 "Hit return to continue (12)"
  67. set zrange [-0.35:0.35]
  68. replot
  69. pause -1 "Hit return to continue (13)"
  70. set title "Sinc function"
  71. set label 1 "This is equal to 1" at -5,-2,0.75 right
  72. set arrow 1 from -5,-2.1,0.75 to 0,0,1
  73. sinc(u,v) = sin(sqrt(u**2+v**2)) / sqrt(u**2+v**2)
  74. splot [-5:5.01] [-5:5.01] sinc(u,v)
  75. pause -1 "Hit return to continue (14)"
  76. set view 70,20,1
  77. set zrange [-0.5:1.0]
  78. set ztics -1,0.25,1
  79. set label 1 "This is equal to 1" at -5,-2,1.5 centre
  80. set arrow 1 from -5,-2.1,1.4 to 0,0,1
  81. splot [-12:12.01] [-12:12.01] sinc(u,v)
  82. pause -1 "Hit return to continue (15)"
  83. set noarrow
  84. set ztics
  85. set nolabel
  86. set log
  87. set auto
  88. set title "This has logarithmic scale"
  89. splot [x=1:15] [y=1:15] x**2+y**2
  90. pause -1 "Hit return to continue (16)"
  91. set nolog
  92. set xrange [0:15]
  93. set yrange [0:15]
  94. set auto
  95. set zrange [-0.6:0.6]
  96. set data style lines
  97. set title "Data grid plotting"
  98. set parametric
  99. splot "glass.dat"
  100. pause -1 "Hit return to continue (17)"
  101. splot "glass.dat" using 3:2:1
  102. pause -1 "Hit return to continue (18)"
  103. set zrange [-1.2:1.2]
  104. set noparametric
  105. splot "glass.dat" using 1, "glass.dat" using 2, "glass.dat" using 3
  106. pause -1 "Hit return to continue (19)"
  107.  
  108. #
  109. # Clean up:
  110. #
  111. set samples 100
  112. set isosamples 10
  113. set view 60,30,1,1
  114. set xrange [-10:10]
  115. set yrange [-10:10]
  116. set zrange [-10:10]
  117. set auto
  118. set title "" 0,0
  119. set xlabel "" 0,0
  120. set ylabel "" 0,0
  121. set zlabel "" 0,0
  122.